const express = require("express");
const router = express.Router();
const pool = require("../pool");

// 二级密码验证
router.post("/verify-pwd", (req, res, next) => {
  pool.query(
    `select * from secondary_password where owner = ?`,
    [req.body.owner],
    (err, result) => {
      if (err) return next(err);
      if (result.length == 0) {
        res.send({
          code: 400,
          msg: "未找到信息",
        });
      } else {
        res.send({
          code: 200,
          msg: "success",
          data: result,
        });
      }
    }
  );
});
module.exports = router;
